{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<style type="text/css">
    input[type="radio"] + label::before {
        content: "\a0"; /*不换行空格*/
        display: inline-block;
        vertical-align: middle;
        font-size: 16px;
        width: 1em;
        height: 1em;
        margin-right: .4em;
        border-radius: 50%;
        border: 2px solid #ddd;
        text-indent: .15em;
        line-height: 1; 
    }
    input[type="radio"]:checked + label::before {
        background-color: #44ABF7;
        background-clip: content-box;
        padding: .1em;
        border: 2px solid #44ABF7;
    }
    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }
</style>
<ul class="nav nav-tabs">    
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">短信设置</a></li>
</ul>

<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="invitative">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                系统设置&nbsp;>&nbsp;短信设置
            </div>
            <div class="panel-body">
            <div class="form-group">
                    <label for="lastname" class="col-sm-2 control-label">是否开启短信</label>
                    <div class="col-sm-10">
                         <label class="radio-inline">
                            <input type="radio" id="emailwy1" name="is_open" value="1" {if $item['is_open']==1 || empty($item['is_open'])}checked{/if} />
                            <label for="emailwy1">开启</label>
                        </label>
                        <label class="radio-inline">
                            <input type="radio" id="emailwy2" name="is_open" value="2" {if $item['is_open']==2}checked{/if} />
                            <label for="emailwy2">关闭</label>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">短信服务类型</label>
                    <div class="col-sm-9">
                        <select class="col-sm-5" id="test" name="item" autocomplete="off">  
                            <option value="1" {if $item['item']=='1'} selected {/if}>聚合数据</option>
                            <option value="2" {if $item['item']=='2'} selected {/if}>阿里云</option>
                        </select>
                    </div>
                </div>
                <div class="form-group control">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">应用key：</label>
                    <div class="col-sm-9">
                        <input type="text" name="appkey" value="{$item['appkey']}" id="web_name" class="form-control" />
                    </div>
                </div>

                <div class="form-group aliyun">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">阿里云用户名/AppKey：</label>
                    <div class="col-sm-9">
                        <input type="text" name="aliyun_appkey" value="{$item['aliyun_appkey']}" id="web_name" class="form-control" />
                    </div>
                </div>
                <div class="form-group aliyun">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 秘钥/AppSecret：</label>
                    <div class="col-sm-9">
                        <input type="text" name="aliyun_appsecret" value="{$item['aliyun_appsecret']}" id="web_name" class="form-control" />
                    </div>
                </div>
                <div class="form-group aliyun">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">短信签名：</label>
                    <div class="col-sm-9">
                        <input type="text" name="aliyun_sign" value="{$item['aliyun_sign']}" id="web_name" class="form-control" />
                    </div>
                </div>


                <div class="form-group ">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">短信模板id(验证码)：</label>
                    <div class="col-sm-9">
                        <input type="text" name="tpl_id" value="{$item['tpl_id']}" id="web_name" class="form-control" />
                        <div class="help-block">商家入驻收到短信通知</div>
                    </div>
                </div>
                <div class="form-group ">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">短信模板id(通知)：</label>
                    <div class="col-sm-9">
                        <input type="text" name="tpl2_id" value="{$item['tpl2_id']}" id="web_name" class="form-control" />
                        <div class="help-block">用户购买商品商家收到短信通知</div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="form-group">
            <input type="submit" name="submit" value="保存设置" class="btn col-lg-3" style="color: white;background-color: #44ABF7;" />
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}" />
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-12").show();
        $("#yframe-12").addClass("wyactive");select()
        $("#test").change(function(){
            select()
        })
        function select(){
             var options=$("#test option:selected").val(); //获取选中的项
             if(options==1){
                $(".control").show()
                $(".aliyun").hide()

             }else{
                $(".control").hide()
                $(".aliyun").show()
            
             }
            }
        })
</script>{template 'common/footer'}